import React from "react";
interface PersonProps {
  name: string;
  content?: React.ReactNode; // jsx类型
}
function Person(props: PersonProps) {
  return (
    <div>
      <h3>你好,我是{props.name}</h3>
      {props.content}
    </div>
  );
}
const Animal: React.FC<PersonProps> = (props) => {
  return (
    <div>
      <h2>{props.name}</h2>
    </div>
  );
};

function App() {
  return (
    <div>
      <h2>hello TS</h2>
      <Person name="MJY" content={<button>提交</button>} />
      <Animal name="动物" />
    </div>
  );
}

export default App;
